package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AsysStudentInteractionMapper;
import com.ruoyi.system.domain.AsysStudentInteraction;
import com.ruoyi.system.service.IAsysStudentInteractionService;

/**
 * 学生课堂互动记录Service业务层处理
 *
 * @author 杨佳霖
 * @date 2025-08-29
 */
@Service
public class AsysStudentInteractionServiceImpl implements IAsysStudentInteractionService
{
    @Autowired
    private AsysStudentInteractionMapper asysStudentInteractionMapper;

    /**
     * 查询学生课堂互动记录
     *
     * @param id 学生课堂互动记录主键
     * @return 学生课堂互动记录
     */
    @Override
    public AsysStudentInteraction selectAsysStudentInteractionById(Long id)
    {
        return asysStudentInteractionMapper.selectAsysStudentInteractionById(id);
    }

    /**
     * 查询学生课堂互动记录列表
     *
     * @param asysStudentInteraction 学生课堂互动记录
     * @return 学生课堂互动记录
     */
    @Override
    public List<AsysStudentInteraction> selectAsysStudentInteractionList(AsysStudentInteraction asysStudentInteraction)
    {
        return asysStudentInteractionMapper.selectAsysStudentInteractionList(asysStudentInteraction);
    }

    /**
     * 新增学生课堂互动记录
     *
     * @param asysStudentInteraction 学生课堂互动记录
     * @return 结果
     */
    @Override
    public int insertAsysStudentInteraction(AsysStudentInteraction asysStudentInteraction)
    {
        asysStudentInteraction.setCreateTime(DateUtils.getNowDate());
        return asysStudentInteractionMapper.insertAsysStudentInteraction(asysStudentInteraction);
    }

    /**
     * 修改学生课堂互动记录
     *
     * @param asysStudentInteraction 学生课堂互动记录
     * @return 结果
     */
    @Override
    public int updateAsysStudentInteraction(AsysStudentInteraction asysStudentInteraction)
    {
        asysStudentInteraction.setUpdateTime(DateUtils.getNowDate());
        return asysStudentInteractionMapper.updateAsysStudentInteraction(asysStudentInteraction);
    }

    /**
     * 批量删除学生课堂互动记录
     *
     * @param ids 需要删除的学生课堂互动记录主键
     * @return 结果
     */
    @Override
    public int deleteAsysStudentInteractionByIds(Long[] ids)
    {
        return asysStudentInteractionMapper.deleteAsysStudentInteractionByIds(ids);
    }

    /**
     * 删除学生课堂互动记录信息
     *
     * @param id 学生课堂互动记录主键
     * @return 结果
     */
    @Override
    public int deleteAsysStudentInteractionById(Long id)
    {
        return asysStudentInteractionMapper.deleteAsysStudentInteractionById(id);
    }
}
